package com.shop.cereshop.commons.domain.agent;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.time.LocalDateTime;

@TableName("cere_agent_private")
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class CereAgentPrivate {

  /**
   * 主键ID
   */
  @ApiModelProperty(value = "主键ID")
  @TableId(value = "agent_private_id", type = IdType.AUTO)
  private Long agentPrivateId;

  /**
   * 用户id
   */
  @ApiModelProperty(value = "用户id")
  @TableField("agent_user_id")
  private Long agentUserId;

  /**
   * 邀请码
   */
  @ApiModelProperty(value = "邀请码")
  @TableField("invite_code")
  private String inviteCode;
  /**
   * 逻辑删除
   */
  @ApiModelProperty(value = "逻辑删除")
  @TableField("deleted")
  private Integer deleted;

  /**
   * 总消费金额(成为代理商消费的总消费金额)
   */
  @ApiModelProperty(value = "总消费金额(成为代理商消费的总消费金额)")
  @TableField("total_purchase_amount")
  private Double totalPurchaseAmount;

  /**
   * 代理区域的adcode
   */
  @ApiModelProperty(value = "代理区域的adcode")
  @TableField("city_code")
  private String cityCode;

  /**
   * 代理区域的名称
   */
  @ApiModelProperty(value = "代理区域的名称")
  @TableField("city_name")
  private String cityName;

  /**
   * 创建时间
   */
  @ApiModelProperty(value = "创建时间")
  @TableField("create_time")
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  private LocalDateTime createTime;

  /**
   * 更新时间
   */
  @ApiModelProperty(value = "更新时间")
  @TableField("update_time")
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  private LocalDateTime updateTime;

  /**
   * 成为代理商所要花费的金额
   */
  @ApiModelProperty(value = "成为代理商所要花费的金额")
  private BigDecimal agentMoney;

  /**
   * 角色类型：1-代理商，2-业务员
   */
  @ApiModelProperty(value = "角色类型：1-代理商，2-业务员")
  @TableField("role_type")
  private Integer roleType;

  /**
   * 业务员套餐id
   */
  @ApiModelProperty(value = "业务员套餐id")
  @TableField("package_id")
  private Long packageId;

  /**
   * 业务员套餐到期时间
   */
  @ApiModelProperty(value = "业务员套餐到期时间")
  @TableField("package_expire")
  private LocalDateTime packageExpire;

  /**
   * 是否正式角色(0-否，1-是)
   */
  @ApiModelProperty(value = "是否正式角色(0-否，1-是)")
  @TableField("if_formal")
  private Integer ifFormal;

}
